Benjamin Otte [Thu, 16 Jul 2020 14:33:14 +0000 (16:33 +0200)]
array: Add a bunch of new features
* GDK_ARRAY_BY_VALUE
#define this to get GArray-like behavior
* gdk_array_splice (v, 0, 0, NULL, 25)
Adding items but passing NULL as the items will zero() them.
* gdk_array_set_size()
A nicer way to call gdk_array_splice()
* constify getters
Benjamin Otte [Fri, 3 Jul 2020 02:21:07 +0000 (04:21 +0200)]
icontheme: Use GdkArray
Benjamin Otte [Thu, 2 Jul 2020 21:32:04 +0000 (23:32 +0200)]
array: Add null-termination
Benjamin Otte [Thu, 2 Jul 2020 21:32:04 +0000 (23:32 +0200)]
snapshot: Port node list to GdkArray
Benjamin Otte [Thu, 2 Jul 2020 20:59:40 +0000 (22:59 +0200)]
snapshot: Move structs into .c file
They aren't used anywhere else.
Benjamin Otte [Thu, 2 Jul 2020 18:51:16 +0000 (20:51 +0200)]
Remove preallocated array code
Now with GdkArray, we can use that one instead.
Benjamin Otte [Thu, 2 Jul 2020 18:50:14 +0000 (20:50 +0200)]
main: Use a GdkArray
Benjamin Otte [Thu, 2 Jul 2020 16:30:55 +0000 (18:30 +0200)]
cssselector: Use GdkArray
Benjamin Otte [Thu, 2 Jul 2020 15:23:09 +0000 (17:23 +0200)]
Add GdkArray
This is a scary idea where you #define a bunch of preprocessor values
and then #include "gdkarrayimpl.c" and end up with a dynamic array for
that data type.
See https://en.wikipedia.org/wiki/X_Macro for what's going on.
What are the advantages over using GArray or GPtrArray?
* It's typesafe
Because it works like C++ templates, we can use the actual type of
the object instead of having to use gpointer.
* It's one less indirection
instead of 2 indirections via self->array->data, this array is
embedded, so self->array is the actual data, and just one indirection
away. This is pretty irrelevant in general, but can be very noticable
in tight loops.
* It's all inline
Because the whole API is defined as static inline functions, the
compiler has full access to everything and can (and does) optimize
out unnecessary calls, thereby speeding up some operations quite
significantly, when full optimizations are enabled.
* It has more features
In particular preallocation allows for avoiding malloc() calls, which
can again speed up tight loops a lot.
But there's also splice(), which is very useful when used with
listmodels.
Matthias Clasen [Thu, 16 Jul 2020 12:52:46 +0000 (12:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2249
Matthias Clasen [Thu, 16 Jul 2020 02:14:36 +0000 (22:14 -0400)]
inspector: Avoid losing a reference
This was copying the example in the treelistrowsorter
docs that the previous commit fixed, so we apply
the same fix here.
Matthias Clasen [Thu, 16 Jul 2020 02:13:36 +0000 (22:13 -0400)]
treelistrowsorter: Fix a faulty example
gtk_tree_list_row_sorter_new() consumes the
sorter, so we can't pass gtk_column_view_get_sorter(),
since that is transfer none.
Matthias Clasen [Thu, 16 Jul 2020 01:22:21 +0000 (21:22 -0400)]
inspector: Don't derive from GtkBox
We don't do that anymore. A bin layout
is sufficient here.
Matthias Clasen [Thu, 16 Jul 2020 00:28:05 +0000 (20:28 -0400)]
inspector: Drop a Private struct
These are really not needed in the inspector.
Matthias Clasen [Thu, 16 Jul 2020 00:24:00 +0000 (20:24 -0400)]
inspector: Drop an unused field
Efstathios Iosifidis [Wed, 15 Jul 2020 18:12:26 +0000 (18:12 +0000)]
Update Greek translation
Matthias Clasen [Wed, 15 Jul 2020 16:52:05 +0000 (16:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Use substring matching in the property list
See merge request GNOME/gtk!2247
Matthias Clasen [Wed, 15 Jul 2020 15:29:06 +0000 (11:29 -0400)]
inspector: Use substring matching in the property list
This is convenient for things like "set both hexpand and
vexpand", since you can then search for "expand"
Florentina Mușat [Wed, 15 Jul 2020 08:58:58 +0000 (08:58 +0000)]
Update Romanian translation
Matthias Clasen [Wed, 15 Jul 2020 01:41:35 +0000 (01:41 +0000)]
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker
See merge request GNOME/gtk!2242
Matthias Clasen [Wed, 15 Jul 2020 01:40:49 +0000 (01:40 +0000)]
Merge branch 'wip/fix-picom-crasher' into 'master'
x11: Don't set up frame sync fence on unsupported compositors
Closes #2927
See merge request GNOME/gtk!2245
Matthias Clasen [Wed, 15 Jul 2020 01:38:55 +0000 (01:38 +0000)]
Merge branch 'idle-inhibit' into 'master'
Add support for idle inhibition on Wayland
Closes #2202
See merge request GNOME/gtk!2226
Matthias Clasen [Wed, 15 Jul 2020 01:38:38 +0000 (01:38 +0000)]
Merge branch 'shortcuts-section-reflow-fix' into 'master'
Fix shortcuts section reflow
Closes #2928
See merge request GNOME/gtk!2246
Emmanuel Gil Peyrot [Fri, 10 Jul 2020 13:53:05 +0000 (15:53 +0200)]
gtk/wayland: Add support for idle inhibition in GtkApplication
This feature was previously only supported on DBus compositors, such as
Mutter, this adds support for other compositors such as all of those
based on wlroots.
This implementation prefers the idle-inhibit Wayland protocol to the
DBus version if it is available, since the inhibitor is per-surface
instead of global it allows a finer control over which displays get
dimmed for instance. For every case not supported by this protocol, a
fallback to the DBus version is used.
It can’t do anything if the GtkWindow isn’t passed, which might warrant
some documentation change to encourage users to not use NULL for this
argument.
This has been tested on Sway.
Fixes #2202.
Emmanuel Gil Peyrot [Tue, 14 Jul 2020 19:18:03 +0000 (21:18 +0200)]
gdk/wayland: Add an API to inhibit and uninhibit idle
This uses the idle-inhibit protocol from wayland-protocols, to attach an
inhibitor to the GdkSurface. The inhibit function can be called as many
times as the user wants, but the uninhibit function MUST be called as
many times to unset the idle inhibition.
This has been tested on Sway.
Matthias Clasen [Tue, 14 Jul 2020 18:47:23 +0000 (14:47 -0400)]
Fix shortcuts section reflow
When this code was ported from gtk_container_get_children
to the dom api, we inadvertendly inverted the order of the
list in one place. With the dom api, we can just avoid
reversing lists altogether, so do that.
Fixes: #2928
Ray Strode [Tue, 14 Jul 2020 13:40:34 +0000 (09:40 -0400)]
x11: Don't set up frame sync fence on unsupported compositors
Not all compositors support _NET_WM_FRAME_DRAWN. In cases
where the compositor doesn't support _NET_WM_FRAME_DRAWN we don't
need to do all the fancy damage tracking and fence watching.
Furthermore, if the compositor doesn't support _NET_WM_FRAME_DRAWN,
it's possible that one frame will start before the previous frame has
made it through the pipeline, leading to a blown assertion.
This commit side-steps the unnecessary code and associated assertion
when _NET_WM_FRAME_DRAWN isn't supported.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2927
Florentina Mușat [Tue, 14 Jul 2020 14:52:19 +0000 (14:52 +0000)]
Update Romanian translation
Matthias Clasen [Tue, 14 Jul 2020 11:47:36 +0000 (11:47 +0000)]
Merge branch 'wip/jimmac/large-title-letterspacing' into 'master'
Adwaita: revert letter-spacing for large-title
Closes #2932
See merge request GNOME/gtk!2243
Yuri Chornoivan [Tue, 14 Jul 2020 10:33:34 +0000 (10:33 +0000)]
Update Ukrainian translation
Jakub Steiner [Tue, 14 Jul 2020 10:24:25 +0000 (12:24 +0200)]
Adwaita: revert letter-spacing for large-title
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2932
Jakub Steiner [Mon, 13 Jul 2020 14:01:01 +0000 (16:01 +0200)]
Adwaita: sidebar color for file picker
- use menu like hovers and desaturated selected_bg_color
Partially addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
Matthias Clasen [Tue, 14 Jul 2020 02:43:25 +0000 (02:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2241
Matthias Clasen [Tue, 14 Jul 2020 00:49:56 +0000 (20:49 -0400)]
inspector: Show some information about expressions
This is not too useful, but better than nothing.
Matthias Clasen [Tue, 14 Jul 2020 00:19:07 +0000 (20:19 -0400)]
expression: Add some introspection
Add a few apis to peek inside expressions, mainly
for the benefit of GtkInspector and similar uses.
Matthias Clasen [Mon, 13 Jul 2020 21:54:27 +0000 (17:54 -0400)]
gtk-demo: Make the words demo expand
We want to fill the window here.
Matthias Clasen [Mon, 13 Jul 2020 21:32:52 +0000 (17:32 -0400)]
inspector: Ellipsize in the object tree
We don't want a long label to blow up the width
of the inspector window.
Matthias Clasen [Mon, 13 Jul 2020 21:13:43 +0000 (17:13 -0400)]
inspector: Fix up input enum names
We've recently added and removed a few values in these
enumerations. Keep the names in sync, so we don't show
nonsense.
Matthias Clasen [Mon, 13 Jul 2020 20:54:05 +0000 (16:54 -0400)]
NEWS: Updates and fixes
Matthias Clasen [Mon, 13 Jul 2020 20:48:08 +0000 (20:48 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2240
Matthias Clasen [Mon, 13 Jul 2020 19:06:35 +0000 (15:06 -0400)]
treeexpander: Be focusable
We need to be focusable so that we can take focus
if the child doesn't.
Matthias Clasen [Mon, 13 Jul 2020 19:06:08 +0000 (15:06 -0400)]
searchbar: Set a focus vfunc
We don't want to take focus ourselves here.
Matthias Clasen [Mon, 13 Jul 2020 16:31:07 +0000 (16:31 +0000)]
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker
Closes #1586
See merge request GNOME/gtk!2238
Jakub Steiner [Mon, 13 Jul 2020 14:01:01 +0000 (16:01 +0200)]
Adwaita: sidebar color for file picker
- avoid using the selected blue for the sidebar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
Matthias Clasen [Mon, 13 Jul 2020 14:38:03 +0000 (14:38 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2236
Matthias Clasen [Mon, 13 Jul 2020 14:32:06 +0000 (14:32 +0000)]
Merge branch 'wip/carlosg/windowhandle-gesture-state' into 'master'
gtkwindowhandle: Only claim gesture on action
See merge request GNOME/gtk!2237
Yuri Chornoivan [Mon, 13 Jul 2020 14:18:40 +0000 (14:18 +0000)]
Update Ukrainian translation
Carlos Garnacho [Mon, 13 Jul 2020 13:44:58 +0000 (15:44 +0200)]
gtkwindowhandle: Only claim gesture on action
The press gesture does not need to set claimed state just for n-press
tracking, it will however reset all other click gestures on each press
if the event gets propagated all the way up.
Fixes tracking of multi-press in gestures in widgets that are children
of the window handle. E.g. the headerbar listview in the "File browser"
gtk4-demo demo.
Matthias Clasen [Mon, 13 Jul 2020 12:26:20 +0000 (08:26 -0400)]
Give the inspector a devel header too
Lets clearly communicate that we're unstable.
Matthias Clasen [Mon, 13 Jul 2020 12:23:39 +0000 (08:23 -0400)]
print-editor: Set the devel style class
Lets clearly communicate that we're unstable.
Matthias Clasen [Mon, 13 Jul 2020 11:29:03 +0000 (07:29 -0400)]
Integrate the new icons
Install and use the node-editor and print-editor icons.
Jakub Steiner [Mon, 13 Jul 2020 09:57:14 +0000 (11:57 +0200)]
demos: icons for Print and Node Editors
- probably needs meson build hooks
Piotr Drąg [Mon, 13 Jul 2020 11:17:37 +0000 (13:17 +0200)]
Update POTFILES.in
Matthias Clasen [Sun, 12 Jul 2020 23:16:35 +0000 (23:16 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Work harder to filter the tree
See merge request GNOME/gtk!2234
Matthias Clasen [Sun, 12 Jul 2020 22:24:04 +0000 (18:24 -0400)]
gtk-demo: Work harder to filter the tree
Arrange for an item to be visible if it either
matches the filter or has children that do.
Matthias Clasen [Sun, 12 Jul 2020 21:23:07 +0000 (21:23 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2233
Matthias Clasen [Sun, 12 Jul 2020 20:47:51 +0000 (16:47 -0400)]
demo: Clear filter when search is stopped
When the search entry disappears on Escape,
reset the search string to "", so we don't
end up with a filtered list and no obvious
way to remove the filtering.
Matthias Clasen [Sun, 12 Jul 2020 20:26:17 +0000 (16:26 -0400)]
gtk-demo: Make the search bar appear for typing
Having the search bar present from the start is
a bit jarring. Make it appear when called for.
Matthias Clasen [Sun, 12 Jul 2020 20:25:24 +0000 (16:25 -0400)]
searchbar: Add a key-capture-widget property
This is handy to set up this relationship in ui files,
and also makes it accessible in the inspector.
Matthias Clasen [Sun, 12 Jul 2020 19:04:00 +0000 (19:04 +0000)]
Merge branch 'wip/sadiq/demo-filter' into 'master'
demo: Add a search filter
See merge request GNOME/gtk!2232
Matthias Clasen [Sun, 12 Jul 2020 16:59:10 +0000 (16:59 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2231
Mohammed Sadiq [Sun, 12 Jul 2020 15:39:27 +0000 (21:09 +0530)]
demo: Add a search filter
Matthias Clasen [Sun, 12 Jul 2020 14:43:51 +0000 (10:43 -0400)]
Fix gtk_file_chooser_error_stack_set_custom_error
This never worked, due to a typo.
Matthias Clasen [Sun, 12 Jul 2020 14:35:43 +0000 (10:35 -0400)]
Drop GtkFileChooserEmbed
This private interface is no longer used.
Matthias Clasen [Sun, 12 Jul 2020 16:14:32 +0000 (12:14 -0400)]
filechooserdialog: Stop using ::response-requested
Replace the ::response-requested signal by an action.
Matthias Clasen [Sun, 12 Jul 2020 14:34:27 +0000 (10:34 -0400)]
filechooserdialog: Stop using the embed interface
Just call private GtkFileChooserWidget api. There
is no real justification for diverting this through
an extra interface.
Matthias Clasen [Sun, 12 Jul 2020 14:26:34 +0000 (10:26 -0400)]
Remove unused includes
Only GtkFileChooserWidget and GtkFileChooserDialog
use the GtkFileChooserEmbed interface.
Matthias Clasen [Sun, 12 Jul 2020 14:20:52 +0000 (10:20 -0400)]
filechooserwidget: Use dropdown api better
We now have GtkStringList, so we can implement
the choice api a little cleaner with it.
Matthias Clasen [Sun, 12 Jul 2020 14:05:57 +0000 (10:05 -0400)]
filechooserwidget: Remove homegrown profiling
We have sysprof support now, so we no longer have
to use this homegrown profiler.
Matthias Clasen [Sun, 12 Jul 2020 14:41:01 +0000 (14:41 +0000)]
Merge branch 'drop-file-system' into 'master'
Drop file system
See merge request GNOME/gtk!2229
Matthias Clasen [Sun, 12 Jul 2020 13:58:30 +0000 (13:58 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Make style apply in the file browser
See merge request GNOME/gtk!2230
Matthias Clasen [Sun, 12 Jul 2020 03:24:10 +0000 (23:24 -0400)]
Drop GtkFileSystem
It is no longer used.
Matthias Clasen [Sun, 12 Jul 2020 03:17:40 +0000 (23:17 -0400)]
filechooserwidget: Stop using GtkFileSystem
Just use gio directly.
Matthias Clasen [Sun, 12 Jul 2020 01:42:16 +0000 (21:42 -0400)]
filechooser: Drop get_file_system from the interface
This is no longer used.
Matthias Clasen [Sun, 12 Jul 2020 01:40:06 +0000 (21:40 -0400)]
filechooserbutton: Stop using GtkFileSystem
Just use gio directly.
Matthias Clasen [Sat, 11 Jul 2020 22:11:32 +0000 (18:11 -0400)]
Reduce includes of gtkfilesystem.h
Move a few non-filesystem helpers to gtkfileutils.h,
and drop the include in all the places where it isn't needed.
Matthias Clasen [Sat, 11 Jul 2020 21:59:36 +0000 (17:59 -0400)]
pathbar: Stop using GtkFileSystem
This is just a thin wrapper around some gio functionality
these days, and we want to get rid of it.
Matthias Clasen [Sun, 12 Jul 2020 12:06:28 +0000 (08:06 -0400)]
gtk-demo: Make style apply in the file browser
Commit
5afe6f7825e1e5 claims to make this demo
'look good', but it failed to actually make its
css apply. Now it really looks good.
Matthias Clasen [Sat, 11 Jul 2020 21:23:55 +0000 (17:23 -0400)]
pathbar: Drop the Private struct
Matthias Clasen [Fri, 10 Jul 2020 19:29:18 +0000 (19:29 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Fix the build with clang
See merge request GNOME/gtk!2225
Matthias Clasen [Fri, 10 Jul 2020 15:55:46 +0000 (11:55 -0400)]
Fix the build with clang
clang doesn't allow G_GNUC_FALLBACK in dead code.
Seems silly, but what can we do.
Emmanuele Bassi [Fri, 10 Jul 2020 17:01:56 +0000 (17:01 +0000)]
Merge branch 'ebassi/ci-timeout' into 'master'
Ebassi/ci timeout
See merge request GNOME/gtk!2223
Matthias Clasen [Fri, 10 Jul 2020 16:13:48 +0000 (16:13 +0000)]
Merge branch 'ci-tweaks' into 'master'
ci: Use lsan again
See merge request GNOME/gtk!2224
Emmanuele Bassi [Fri, 10 Jul 2020 15:32:15 +0000 (16:32 +0100)]
build: Restructure the tests to use dictionaries
Instead of an array of arrays, let's use an array of dictionaries; it's
easier to add optional keys without requiring to remember where to put
empty arrays.
Emmanuele Bassi [Fri, 10 Jul 2020 15:16:15 +0000 (16:16 +0100)]
Add the filtermodel-exhaustive test to the slow suite
This increases the default timeout.
Emmanuele Bassi [Fri, 10 Jul 2020 15:12:25 +0000 (16:12 +0100)]
Increase the default timeout for slow tests
If a test is part of the 'slow' test suite, we should increment the
default timeout to compensate.
Matthias Clasen [Fri, 10 Jul 2020 15:11:42 +0000 (11:11 -0400)]
ci: Use lsan again
Turning it off didn't fix the crashes; and we allow
the asan build to fail anyway now. And the leak reports
are useful whenever it doesn't crash.
Emmanuele Bassi [Fri, 10 Jul 2020 15:08:59 +0000 (16:08 +0100)]
ci: Increase the timeout multiplier
We do have some slow tests.
Emmanuele Bassi [Fri, 10 Jul 2020 15:08:14 +0000 (16:08 +0100)]
ci: Use the timeout multiplier from the environment
When running our test suite on our CI infrastructure.
Matthias Clasen [Fri, 10 Jul 2020 13:04:34 +0000 (13:04 +0000)]
Merge branch 'asan-ci' into 'master'
Asan ci
See merge request GNOME/gtk!2214
Matthias Clasen [Fri, 10 Jul 2020 11:32:48 +0000 (07:32 -0400)]
Disable lsan for now
The leak sanitizer causes on average 3-4 tests
to segfault during a testsuite run. Disable it
for now to see if we can get a successful
testsuite run with asan alone.
Matthias Clasen [Thu, 9 Jul 2020 23:53:25 +0000 (23:53 +0000)]
Merge branch 'wip/Jehan/gio-querymodules-pkg-config-master' into 'master'
build-aux: search various Glib/GIO utilities in .pc file.
See merge request GNOME/gtk!2129
Matthias Clasen [Thu, 9 Jul 2020 02:22:31 +0000 (22:22 -0400)]
ci: Add a build with asan
Run our testsuite under asan. We do this in a
separate build, since we need to turn off
introspection to make the build succeed.
As Michael Catanzaro pointed out, this requires a
privileged runner in order to use kernel apis.
Matthias Clasen [Thu, 9 Jul 2020 23:06:37 +0000 (23:06 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
x11: Plug a memory leak
See merge request GNOME/gtk!2222
Matthias Clasen [Thu, 9 Jul 2020 17:52:53 +0000 (13:52 -0400)]
x11: Plug a memory leak
Don't leak atoms when we're storing the clipboard.
Benjamin Otte [Thu, 9 Jul 2020 21:34:02 +0000 (21:34 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2221
Benjamin Otte [Tue, 7 Jul 2020 17:02:29 +0000 (19:02 +0200)]
sorter: Remove a return_if_fail()
It's too expsensive.
Benjamin Otte [Thu, 9 Jul 2020 20:26:57 +0000 (22:26 +0200)]
testsuite: Be more exhaustive
Create larger source models in tests, so that we hit the incremental
batch size more often and have a higher chance to expose bugs there.
Benjamin Otte [Thu, 9 Jul 2020 20:22:04 +0000 (22:22 +0200)]
filterlistmodel: Don't filter out every 513th element
Incremental filtering would skip every 513th element due to an
off-by-one error.
Test included
Matthias Clasen [Thu, 9 Jul 2020 17:55:02 +0000 (13:55 -0400)]
Ignore more leaks in asan
These showed up in ci. The atk-bridge will
be gone before too long anyway. Since we
may not have debug symbols in ci, just at
the so's.